package com.shli.dao;

import com.shli.domain.ViewSpace;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class ViewSpaceDao extends BaseDao<ViewSpace>{
    public List<ViewSpace> queryByName(String name)
    {
        String hql = "from ViewSpace vs where vs.spaceName like ?";
        return (List<ViewSpace>) find(hql,name);
    }

    public List<ViewSpace> queryByUserId(int userId)
    {
        String hql = "from ViewSpace vs where vs.user.userId=?";
        return (List<ViewSpace>) find(hql,userId);
    }
}

